/** \file Throw.cc
 * Definitions for the overloaded Throw methods.
 *
 * (c) Copyright  Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id: Throw.cc 119 2006-06-21 04:57:25Z semihc $
 *
 *
 */

#include "Throw.hh"
#include "Ex.hh"
#include "ExString.hh"
#include "Debug.hh"


using namespace std;
using namespace TC;


TC_IDENT("$Id$");


// Preparations for the subsequent throw
void TC::PrepareForThrow()
{
  //TODO: Print stack trace
}


void TC::Throw(const char* desc, int reason)
{
  PrepareForThrow();
  throw Ex(desc, reason);
}


void TC::Throw(const char* desc, int reason,
               const char* file, int line, const char* func)
{
  PrepareForThrow();
  throw ExSimple(desc, reason, file, line, func);
}


void TC::Throw(const string& desc, int reason,
               const char* file, int line, const char* func)
{
  PrepareForThrow();
  throw ExString(desc, reason, file, line, func);
}

